import { request } from '@/request'
import { cancelData, OrderItem, OrderParams, OrderResult } from '@/types/order'

export function getConditionSearchApi(params: OrderParams) {
  return request<OrderResult>(
    '/admin/order/conditionSearch', "get", params
  )
}

export function getOrderDetailsApi(id: number) {
  return request<OrderItem>(
    `/admin/order/details/${id}`, "get"
  )
}

export function cancelOrderApi(data: cancelData) {
  return request(
    '/admin/order/cancel', "put", data
  )
}
